#include <stdlib.h>
#include <string.h> //memset

#if defined(WIN32) || defined(_WIN32)
    #define PATH_SEPARATOR "\\"
#else
    #define PATH_SEPARATOR "/"
#endif

using namespace std;

//compile input struct
#ifndef _COMPILE_IN

#define _COMPILE_IN

//cannot use enum for CompileMode because of C# managed enums
// _version = 0, _machine, TAP_BAS, BIN = 3, BIN_FILE
#define _version 0
#define _machine 1
#define TAP_BAS 2
#define BIN 3
#define BIN_FILE 4

struct COMPILE_IN
{
    char* chrFileIn;
    char* chrFileOut;
    char* chrFileSymbols;
    char* chrSourceCode;

    char cInputIsFile; // true if the input is file; false => source code
    char cEmitSymbols;

    //cannot use enum for CompileMode because of C# managed enums
    char CompileMode;

    COMPILE_IN()
    {
        chrFileIn = chrFileOut = chrFileSymbols = chrSourceCode = NULL;

        cInputIsFile = '-'; //cannot be flags(bool) due to inconsitency with managed types in C#(.NET)
        cEmitSymbols = '-';
    }
};

#endif

//compiled data
#ifndef _COMPILED_INFO

#define _COMPILED_INFO

struct COMPILED_INFO
{
    //compiled
    char*       czCompiled;
    char*       czFileNameCompiled;
    int         iCompiledSize; // REAL compiled size, without first 2 bytes(mem address where the code will be placed)

    //error info
    int   iErrFileLine;
    char* czErrFileName;
    char* czErrMessage;

    //source code symbols
    char* arrSourceSymbols;

    COMPILED_INFO()
    {
        czCompiled = NULL;
        iCompiledSize = -1;
        iErrFileLine = -1; czErrFileName = czErrMessage = czFileNameCompiled = NULL;
        arrSourceSymbols = NULL;
    };
};
#endif
